import request from '@/utils/request'

export function getTree() {
  return request({
    url: 'resources/tree',
    method: 'get'
  })
}

export function queryPage() {
  return request({
    url: '',
    method: 'post'
  })
}

export function create(temp) {
  return request({
    url: 'resources/add',
    method: 'post',
    data: temp
  })
}

export function update(temp) {
  return request({
    url: 'resources/update',
    method: 'post',
    data: temp
  })
}

export function queryInfo(id) {
  return request({
    url: 'resources/' + id,
    method: 'get'
  })
}

export function deleteById(id) {
  return request({
    url: 'resources/' + id,
    method: 'delete'
  })
}

